//
//  BedSmallCell.m
//  Nurse
//
//  Created by Sunny on 13-12-13.
//  Copyright (c) 2013年 RainSets. All rights reserved.
//

#import "BedSmallCell.h"

@implementation BedSmallCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        [self setup];
    }
    return self;
}

-(void)awakeFromNib{
    [self setup];
}

-(void)setup{
    [self setBackgroundImage:[UIImage imageNamed:@"lightGray.png"] forState:UIControlStateHighlighted];
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

-(void)setSelected:(BOOL)selected{
    [super setSelected:selected];
    
}

-(void)setEnabled:(BOOL)enabled{
    [super setEnabled:enabled];
    if (!enabled) {
        _lblBedNoWithoutPatient.hidden = NO;
        _lblPatientName.hidden = YES;
        _lblBedNumber.hidden = YES;
        //_imgBegInuse.image = [UIImage imageNamed:@"bed-icon_active.png"];
        _imgBegInuse.image = [UIImage imageNamed:@"bed-icon_grey.png"];
        [self setBackgroundImage:[UIImage imageNamed:@"lightGray.png"] forState:UIControlStateNormal];
    }else{
        _lblBedNoWithoutPatient.hidden = YES;
        _lblPatientName.hidden = NO;
        _lblBedNumber.hidden = NO;
        //_imgBegInuse.image = [UIImage imageNamed:@"bed-icon_grey.png"];
        _imgBegInuse.image = [UIImage imageNamed:@"bed-icon-active.png"];
        [self setBackgroundImage:nil forState:UIControlStateNormal];
    }
}

@end
